package cn.com.api.mapper.base;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.*;

import cn.com.api.entity.ApiU_circle;

//DAO
public interface U_circleMapperBase {

	// 根据id查看
	@Select("SELECT * FROM U_CIRCLE  WHERE ID = #{id}")
	public ApiU_circle findU_circleById(Integer id);

	// 查看数据集
	@Select("SELECT * FROM U_circle")
	public List<ApiU_circle> findU_circles();

	// 根据条件查看数据集
	public List<Map<String, Object>> findU_circlesByMap(HashMap condition);

	public int insertU_circle(ApiU_circle u_circle);

	// 修改
	@Update("UPDATE U_CIRCLE SET CREATE_UID = #{create_uid,jdbcType=VARCHAR},is_show_address= #{is_show_address,jdbcType=INTEGER}, "
			+ "CIRCLE_NAME = #{circle_name,jdbcType=VARCHAR}, circle_img = #{circle_img,jdbcType=VARCHAR},CIRCLE_NO = #{circle_no,jdbcType=VARCHAR}, "
			+ "CIRCLE_DESC = #{circle_desc,jdbcType=VARCHAR}, MAX_PEOPLE = #{max_people,jdbcType=INTEGER}, CIRCLE_NOTICE = #{circle_notice,jdbcType=VARCHAR}, "
			+ "IS_NEED_CONFIRM = #{is_need_confirm,jdbcType=INTEGER}, TYPE = #{type,jdbcType=INTEGER}, IS_SHOW_NAME = #{is_show_name,jdbcType=INTEGER}, "
			+ "CIRCLE_LABEL = #{circle_label,jdbcType=VARCHAR}, LONGITUDE = #{longitude,jdbcType=VARCHAR}, LATITUDE = #{latitude,jdbcType=VARCHAR}, "
			+ "IS_DELETE = #{is_delete,jdbcType=INTEGER}, IS_AGAINST = #{is_against,jdbcType=INTEGER}, CREATE_TIME = #{create_time,jdbcType=VARCHAR}, "
			+ "CATE_ID = #{cate_id,jdbcType=VARCHAR}, CATE_NAME = #{cate_name,jdbcType=VARCHAR}, groupid = #{groupid,jdbcType=VARCHAR}, "
			+ "groupname = #{groupname,jdbcType=VARCHAR} WHERE ID = #{id}")
	public int updateU_circle(ApiU_circle u_circle);

	// 删除
	@Delete("DELETE FROM U_CIRCLE  WHERE ID = #{id}")
	public int deleteU_circle(Integer id);

	// Foreign keys revelant

	// region Indexs revelant

}
